import request from "@/utils/request";

// 管理员列表 /admin/manager/:page?limit=10&keyword=ceshi
export const getManagerList = ({page,limit,keyword}) => {
  return request({
    url: `/manager/${page}?limit=${limit}&keyword=${keyword}`,
    method: "get",
  });
};

// 修改状态
export const changStatus = (id,data) => {
  return request({
    url: `/manager/${id}/update_status`,
    method: "POST",
    data,
  });
};

// 添加内容

export const addManager = (data) => {
  return request({
    url: `/manager`,
    method: "POST",
    data,
  });
};
// 修改内容
export const editManager = (id,data) => {
  return request({
    url: `/manager/${id}`,
    method: "POST",
    data,
  });
};
// 删除
export const delManager = (id) => {
  return request({
    url: `/manager/${id}/delete`,
    method: "POST",
  });
};